Skip to content

Conversation

@2501babe
Copy link
Member

@2501babe 2501babe commented Nov 5, 2025

  • updated everything except bincode and clap (thank you cargo upgrade)
  • replaced spl-token, spl-associated-token-account, and spl-associated-token-account-client in the program with interface crates
  • bump cli tools and rust toolchain versions

the diff is large but this has mostly trivial code changes, namely: swapping to token/ata interfaces, changing VoteState to VoteStateV4, changing some import paths, and inlining some format args because clippy wants this now. the only notable change is the addition of VoteStateV4 support to the program

i confess to carefully choosing a nightly version that avoids the this call to clone can be replaced with std::slice::from_ref clippy warning, as i didnt want to further overladen the diff

this is (no longer) blocked by:

closes #397
closes #406

@2501babe 2501babe self-assigned this Nov 5, 2025
@2501babe 2501babe force-pushed the sdk-3.0 branch 2 times, most recently from f17e7b9 to 55acb74 Compare November 6, 2025 09:48
Comment on lines 10 to +13
[features]
no-entrypoint = []
custom-heap = []
custom-panic = []
Copy link
Member Author

@2501babe 2501babe Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone on stack exchange claims you dont need this to silence warnings on the latest solana-program-entrypoint but we are on latest and i still get warnings so i dont think thats true

@2501babe
Copy link
Member Author

since i opened this different sdk packages depend on different versions of solana-hash which depend on different versions of serde now... its not a priority so ill wait a week or two assuming this is transitory

Comment on lines 252 to 257
match u32::from_le_bytes(state_variant) {
1 | 2 => Ok(()),
1 | 2 | 3 => Ok(()),
0 => Err(SinglePoolError::LegacyVoteAccount.into()),
_ => Err(SinglePoolError::UnparseableVoteAccount.into()),
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gives us VoteStateV4 support, it was necessary to do in this pr to get tests to pass. in the future it would be cleaner to switch to the VoteState parser though, which did not exist when this program was originally written. i didnt want to make any nontrivial functional changes in this one

@2501babe 2501babe marked this pull request as ready for review January 5, 2026 07:13
@2501babe 2501babe requested a review from grod220 January 5, 2026 07:13
@2501babe
Copy link
Member Author

2501babe commented Jan 5, 2026

@grod220 not sure if your stake-involvement is going to extend to the pools as well, if not i can give this to jon instead. but despite the large diff this has 1 line that actually changes functionality, the rest is 90% Cargo.lock 10% boilerplate

Copy link
Member

@grod220 grod220 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Think you should feel free to fix the remaining uninlined_format_args or save for later.

@@ -1,4 +1,5 @@
#![allow(clippy::arithmetic_side_effects)]
#![allow(clippy::uninlined_format_args)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed you made a number of fixes that would pass this rule. Maybe worth just fixing the remaining? Up to you.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a future PR, may be nice to use workspace deps for these

@2501babe 2501babe merged commit 154d17e into solana-program:main Jan 5, 2026
20 checks passed
@2501babe 2501babe deleted the sdk-3.0 branch January 5, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support VoteStateV4 upgrade to sdk 3.0

2 participants